package cn.edu.jxau.admin.controller;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import cn.edu.jxau.service.sendNotice;

public class sendNoticeServlet extends HttpServlet {

	private static final long serialVersionUID = 1L;

	/**
		 *处理管理员推送的公告
		 */
	public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        
		request.setCharacterEncoding("utf-8");
		response.setContentType("text/html;charset=utf-8");
		String notice=request.getParameter("notice");//获取公告内容
		sendNotice.insertNotice(notice);
		response.getWriter().print("ok");
	}
}
